package com.wenda.homeschooedu.model;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;

/**
 * 班级类
 * _id:班级编号
 * name ：班级名称（如：三年二班） 
 * master : 班主任
 * @author 周雨浓
 *
 */
@Entity
@Table(name="class")
public class Classes extends BaseModel{
	/**
	 * 
	 */
	private static final long serialVersionUID = 2913842493384911632L;
	private int _id;
	private String name;
	private String master_name;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(nullable=false)
	@ForeignKey(name="master_id")
	private Teacher master ; 
	private String master_phone ;
	private String master_userName ;
	private String master_major ;
	public int get_id() {
		return _id;
	}
	public void set_id(int _id) {
		this._id = _id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMaster_name() {
		return master_name;
	}
	public void setMaster_name(String master_name) {
		this.master_name = master_name;
	}
	public String getMaster_phone() {
		return master_phone;
	}
	public void setMaster_phone(String master_phone) {
		this.master_phone = master_phone;
	}
	public String getMaster_userName() {
		return master_userName;
	}
	public void setMaster_userName(String master_userName) {
		this.master_userName = master_userName;
	}
	public String getMaster_major() {
		return master_major;
	}
	public void setMaster_major(String master_major) {
		this.master_major = master_major;
	}
	public Teacher getMaster() {
		return master;
	}
	public void setMaster(Teacher master) {
		this.master = master;
	}

}
